<?php
namespace Modules\Core\Controllers;

use Core\Mvc\Controller;

class IndexController extends Controller
{

    public function indexAction()
    {
        //extract(self::$variables['router_params']);
        self::$variables += array(
            'title' => self::$variables['webConfig']->indexTitle,
            '#templates' => 'index'
        );
        $translate = $this->config->get('translate');
        if ($translate['translate'] && $this->translate->getLanguage() == false) {
            //$this->response->redirect('/'.$this->translate->getBestLanguage());
        }
    }

    public function notFoundAction()
    {
        $this->response->setStatusCode(404, "Not Found");
        self::$variables += array(
            'title' => '404页面',
            'description' => '404页面',
            '#templates' => 'notFound',
        );
    }
}
